ibis-framework
Ibis-framework 2022/10/15 PyCon JP 2022 調
ibis便
shimizukawa ibisjoinJupyter使


pip install ibis-framework
pip install ibis ...
MySQL
pip install 'ibis-framework[mysql]'
PostgreSQL
pip install 'ibis-framework[postgres]'

import ibis
ibis.options.interactive = True
conn = ibis.mysql.connect(user='root', password='mysql', database='db')
tables = conn.list_tables()
t = conn.tables('some_table')
t.group_by(['genre']).aggregate(count=t.count()).sort_by([ibis.desc('count')]).limit(10)
genre count
0 NaN 9429
1 1.0 2543
2 8.0 1557
3 2.0 1435
4 18.0 1401
5 3.0 1396
6 15.0 1227
7 13.0 1157
8 21.0 1106
9 5.0 1017


shimizukawa 2022/10/16
SQLAlchemyrefrection
SQLAlchemySQLPandasSQL
SQLAlchemyibisjoinJupyter
SQLAlchemy